<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

    </style>
</head>
<body>
<div id="app">
    <keep-alive>
        <div>88888</div>
    </keep-alive>
</div>
<script src="vue.js"></script>
<script>
    /**
     * 生命周期的四个阶段八个钩子
     * 1. 创建 - 创建前 beforeCreate 创建后 created
     * 2. 挂载 - 挂载前 beforeMount 挂载后 mounted
     * 3. 更新 - 更新前 beforeUpdate 更新后 updated
     * 4. 销毁 - 销毁前 beforeDestroy 销毁后 destroyed
     *
     * 还有两个 激活后和失活后
     * activated (在使用<keep-alive>组件时调用, 激活时调用)
     * deactivated (在使用<keep-alive>组件时调用, 失活时调用)
     */
    const app = new Vue({
        el: '#app',
        data: {
        },
    })
</script>
</body>
</html>